﻿using System.Drawing;

namespace LeRenard.Libraries.Drawing.GdiPlus.Forms
{
    /// <summary>
    /// Defines a GDI+ form.
    /// </summary>
    public interface IGdiPlusForm
    {
        /// <summary>
        /// Determines whether to show FPS counter or not.
        /// </summary>        
        bool ShowFps { get; set; }

        /// <summary>
        /// Determines whether to show console or not.
        /// </summary>
        bool ShowConsole { get; set; }
        
        /// <summary>
        /// Gets the current known frames per second.
        /// </summary>        
        int Fps { get; }

        /// <summary>
        /// Draw on the backbuffer.
        /// </summary>
        /// <param name="graphics">The backbuffer.</param>
        void Draw(IBuffer buffer);

        /// <summary>
        /// Gets/sets the font for the console.
        /// </summary>
        Font Font { get; set; }

        /// <summary>
        /// Gets/sets the color of the font for the console.
        /// </summary>
        Color Color { get; set; }

        /// <summary>
        /// Draws a string.
        /// </summary>
        /// <param name="buffer">The buffer to draw on.</param>
        /// <param name="string">The string to draw.</param>        
        /// <param name="x">The x-coordinate of the upper left corner.</param>
        /// <param name="y">The y-coordinate of the upper left corner.</param>
        /// <param name="font">The font to use, if null the default font will be used.</param>
        /// <param name="brush">The brush to use, if null the default brush will be used.</param>
        void DrawString(IBuffer buffer, string @string, float x, float y, Font font = null, SolidBrush brush = null);

        /// <summary>
        /// Writes a message to the console.
        /// </summary>        
        void LogToConsole(string message);
    }
}
